<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>滚动屏幕时隐藏或显示返回顶部导航栏</title>
<link href="css/index-mini-new.css" type="text/css" rel="stylesheet" />
<script src="js/jquery-1.4.1.min.js" type="text/javascript"></script>
<style>
.move_div_top {
	display: none;
	right: 85px;
	overflow: hidden;
	width: 32px;
	color: white;
	bottom: 50px;
	position: absolute;
	height: 90px
}
.move_div_top span {
	display: block; text-align: center
}
.move_div_top span a {
	color: #d22b61; text-decoration: none
}
.move_div_top span a:hover {
	color: #d22b61; text-decoration: none
}
</style>
</head>
<body>

<div style="height:1900px;"></div>

<div class="move_div_top" id="sun_move_div_top"><span><a href="javascript:scroll(0,0)"><img src="images/top_new3.png" align="返回顶部" /></a></span> </div>
<script language="javascript">
//移动小窗口
$(function(){
  var obj=$("#sun_move_div_top");
  if(obj) {
	var move_div_obj = $('#sun_move_div_top');
	var move_div_show = 0;
	var move_div_height = parseInt(move_div_obj.css('height'));
	var move_div_bottom = parseInt(move_div_obj.css('bottom'));
	$(window).scroll(
	  function() {
	  var _clientHeight = document.documentElement.clientHeight;
	  var _scrollTop = document.documentElement.scrollTop-100+document.body.scrollTop;
	  if (move_div_show == 0 && _scrollTop > 50) {
		move_div_obj.fadeIn(200);
		move_div_show = 1; }
	  else if (move_div_show == 1 && _scrollTop < 50) {
		move_div_obj.fadeOut(500);
		move_div_show = 0; }
	  if (_scrollTop > 100 && $.browser.msie && $.browser.version.indexOf('6.0') > -1){
		move_div_obj.css('bottom', '');
		move_div_obj.css('top', 
			 (_scrollTop + _clientHeight - move_div_height - move_div_bottom) + 'px'); }
	})	
  }
})		    
</script>

<script>
/*$(function(){
  $(window).scroll(function(){
	  if($(window).scrollTop()>=1){
		  $("#sun_move_div_top").show;
	  }else{
		  $("#sun_move_div_top").hide();
	  }
  }); 
})*/
</script>

<script>
$("a").each(function(){
	var t=$(this).attr("href");
	if(/[A-Z]/.test(t) && t.indexOf("javascript:")< 0){
		var p=t.toLowerCase();
		$(this).attr("href",p)
	}
})
</script>


</body>
</html>
